package datestructuresjava.shuanglianbiao;

public class Node {
    //定义节点类

        private int no;// 编号
        private String name;// 名称
        private datestructuresjava.shuanglianbiao.Node pre;// 前指针
        private datestructuresjava.shuanglianbiao.Node next;// 后指针

        public int getNo() {
            return no;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public void setNo(int no) {
            this.no = no;
        }

        public datestructuresjava.shuanglianbiao.Node getPre() {
            return pre;
        }

        public void setPre(datestructuresjava.shuanglianbiao.Node pre) {
            this.pre = pre;
        }

        public datestructuresjava.shuanglianbiao.Node getNext() {
            return next;
        }

        public void setNext(datestructuresjava.shuanglianbiao.Node next) {
            this.next = next;
        }

        // 构造器
        public Node(int no, String name) {
            this.no = no;
            this.name = name;
        }

        @Override
        public String toString() {
            return "Node [no=" + no + ", name=" + name + "]";
        }
}
